//
//  ARES.h
//  OR_1
//
//  Created by Luboš Kulič on 6/16/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Network.h"

@class ARES;

@protocol ARESEventListener

-(void) ARES:(ARES *) ares didFinishSearchWithResult:(NSData *) data;

@end


@interface ARES : NSObject <NetworkEventListener> {

	Network * net;
	
	@private
	id<ARESEventListener> listener;
	
	NSString * baseURL;
	
	NSString * ORbaseURL;

}

-(id) init;

-(void) searchForCompany:(NSString *)companyName orID:(NSString *) companyID   notifyEnd:(id<ARESEventListener>) listener_;
// TODO: internal data structure instead of a string

-(void) searchInORfor:(NSString *)companyID notifyEnd:(id<ARESEventListener>) listener_;
// TODO: dedicated method for registering listeners

-(void) network:(Network *)net didFinishLoadingWithResult:(NSData *)data;


@end
